﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Calculator
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        public void addFormula(string a)
        {
            textBox_公式.AppendText(a);
        
        }

        private void button1_Click(object sender, EventArgs e)
        {
            addFormula("1");
        }

        private void button2_Click(object sender, EventArgs e)
        {
            addFormula("2");
        }

        private void button_除_Click(object sender, EventArgs e)
        {
            addFormula("/");
        }

        private void button_乘_Click(object sender, EventArgs e)
        {
            addFormula("*");
        }

        private void button_减_Click(object sender, EventArgs e)
        {
            addFormula("-");
        }

        private void button_加_Click(object sender, EventArgs e)
        {
            addFormula("+");
        }

        private void button3_Click(object sender, EventArgs e)
        {
            addFormula("1");
        }

        private void button4_Click(object sender, EventArgs e)
        {
            addFormula("4");
        }

        private void button5_Click(object sender, EventArgs e)
        {
            addFormula("5");
        }

        private void button6_Click(object sender, EventArgs e)
        {
            addFormula("6");
        }

        private void button7_Click(object sender, EventArgs e)
        {
            addFormula("7");
        }

        private void button8_Click(object sender, EventArgs e)
        {
            addFormula("8");
        }

        private void button9_Click(object sender, EventArgs e)
        {
            addFormula("9");
        }

        private void button0_Click(object sender, EventArgs e)
        {
            addFormula("0");
        }

        private void button_点_Click(object sender, EventArgs e)
        {
            addFormula(".");
        }

        private void button_等于_Click(object sender, EventArgs e)
        {

        }

        private void uiButton1_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Test");
        }
    }
}
